# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=konqueror
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE File Manager & Web Browser"
# armhf blocked by extra-cmake-modules
# s390x, ppc64le and mips(64) blocked by qt5-qtwebengine
arch="all !armhf !s390x !ppc64le !mips !mips64"
url="https://konqueror.org/"
license="GPL-2.0-or-later AND GFDL-1.2-only AND LicenseRef-KDE-Accepted-LGPL"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtwebengine-dev kparts-dev kcmutils-dev karchive-dev kcrash-dev kwindowsystem-dev kinit-dev kiconthemes-dev kdbusaddons-dev kdelibs4support-dev kactivities-dev kdoctools-dev kdesu-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/konqueror-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
options="!check" # Requires OpenGL and running D-Bus server

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="b9763e99e6b0703a704575174f80745e607effbac1d615031dc184d9d2af7d2dcb1161a6f5277baef285c04a0e36a88da1fbd802aa5e00b99c1367ae53cb18b6  konqueror-20.04.3.tar.xz"
